package com.flysh.host.util;

import java.util.List;

import net.sf.json.JSONArray;

import com.flysh.host.model.Menu;
import com.flysh.host.model.Role;
import com.flysh.host.model.User;

public class JSONUtil {
	public static String getRoleJSON(List<Role> list){
		JSONArray jsonArray = JSONArray.fromObject(list);
		return jsonArray.toString();
	}
	
	public static String getUserJSON(List<User> list){
		JSONArray jsonArray = JSONArray.fromObject(list);
		return jsonArray.toString();
	}
	
	public static String getMenuJSON(List<Menu> list){
		JSONArray jsonArray = JSONArray.fromObject(list);
		return jsonArray.toString();
	}

}
